﻿using Microsoft.VisualStudio.TestTools.UnitTesting;
using Rosetta.Default.AddIns;

namespace Rosetta.Tests
{
    [TestClass]
    public class ConverterTests
    {
        #region Public Methods

        [TestMethod]
        public void TestTypeConverter()
        {
            var converter = new TypeConverter();

            Assert.AreEqual(15, converter.ReturnTypes.Length);
            Assert.AreEqual(15, converter.ArgumentTypes.Length);

            Assert.AreEqual(5, converter.Convert<string, int>("StringToInt32")("5"));
            Assert.AreEqual(true, converter.Convert<int, bool>("Int32ToBoolean")(5));
        }

        #endregion
    }
}